import { ITypeAdapterFactory } from './factory/ITypeAdapterFactory'

export class WriterOut {
  private mTypeFactory: ITypeAdapterFactory

  private mWriteValue: ESObject

  private mTarget: ESObject

  constructor(out: ESObject, factory: ITypeAdapterFactory) {
    this.mTarget = out
    this.mTypeFactory = factory
  }

  getTarget(): ESObject {
    return this.mTarget
  }

  setWriteValue(value: ESObject) {
    this.mWriteValue = value
  }

  value(): ESObject {
    return this.mWriteValue
  }

  getTypeFactory(): ITypeAdapterFactory {
    return this.mTypeFactory
  }
}